
import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.List;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author FFK
 */

public class Setingsdetail extends List implements CommandListener{

   private Command back;

    public Setingsdetail() {
        super("Sound", List.EXCLUSIVE);
        append("Sound", null);
        append("Not Sound", null);
        setCommandListener(this);
        back = new Command("OK", Command.BACK , 1);
        addCommand(back);

    }

    public void commandAction(Command cmnd, Displayable dsplbl) {
        if(cmnd == back) {
            int selected = getSelectedIndex();
            System.out.println("Selected:" + selected);
            Game view = Main.getInstance().getGame();
            view.cleanTrackResources();
            if(selected == 0) {
                view.isSound = true;
            }else view.isSound = false;
            Main.getInstance().SMenu();
        }
    }


}
